/** @file bar.h
*/
#ifndef _BAR_H_
#define _BAR_H_

#include "widget.h"

#define TWIND_VBAR      (0)
#define TWIND_HBAR      (1)
#define TWIND_RHBAR     (2)
#define TWIND_RVBAR     (3)

class Bar: public Widget
{
public:
    Bar(HWND parent=0);
    ~Bar();

    void setStyle(char s){style =s;}
    void setValue(int value);
    int getValue(){return position;}
    void setMaxValue(int value){highPosition =value;}
    int getMaxValue(){return highPosition;}
    void setMinValue(int value){lowPosition =value;}
    int getMinValue(){return lowPosition;}

private:
    char style;
    int position;
    int lowPosition;
    int highPosition;
    virtual void draw(Rect *r);
    virtual int eventHandler(HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);
};

#endif


